home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / Xt / XtManageChildren.z / XtManageChildren
Encoding:
Text File  |  2002-10-03  |  12.9 KB  |  265 lines

  1.  
  2.  
  3.  
  4.      XXXXttttMMMMaaaannnnaaaaggggeeeeCCCChhhhiiiillllddddrrrreeeennnn((((3333XXXXtttt))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXttttMMMMaaaannnnaaaaggggeeeeCCCChhhhiiiillllddddrrrreeeennnn((((3333XXXXtttt))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XtManageChildren, XtManageChild, XtUnmanageChildren,
  10.           XtUnmanageChild, XtChangeManagedSet, XtIsManaged - manage
  11.           and unmanage children
  12.  
  13.      SSSSYYYYNNNNTTTTAAAAXXXX
  14.           typedef Widget *WidgetList;
  15.  
  16.           void XtManageChildren(_c_h_i_l_d_r_e_n, _n_u_m__c_h_i_l_d_r_e_n)
  17.                 WidgetList _c_h_i_l_d_r_e_n;
  18.                 Cardinal _n_u_m__c_h_i_l_d_r_e_n;
  19.  
  20.           void XtManageChild(_c_h_i_l_d)
  21.                 Widget _c_h_i_l_d;
  22.  
  23.           void XtUnmanageChildren(_c_h_i_l_d_r_e_n, _n_u_m__c_h_i_l_d_r_e_n)
  24.                 WidgetList _c_h_i_l_d_r_e_n;
  25.                 Cardinal _n_u_m__c_h_i_l_d_r_e_n;
  26.  
  27.           void XtUnmanageChild(_c_h_i_l_d)
  28.                 Widget _c_h_i_l_d;
  29.  
  30.           void XtChangeManagedSet(_u_n_m_a_n_a_g_e__c_h_i_l_d_r_e_n,
  31.           _n_u_m__u_n_m_a_n_a_g_e__c_h_i_l_d_r_e_n, _m_a_n_a_g_e__c_h_i_l_d_r_e_n, _n_u_m__m_a_n_a_g_e__c_h_i_l_d_r_e_n,
  32.           _p_o_s_t__u_n_m_a_n_a_g_e__p_r_e__m_a_n_a_g_e__h_o_o_k, _c_l_i_e_n_t__d_a_t_a)
  33.                 WidgetList _u_n_m_a_n_a_g_e__c_h_i_l_d_r_e_n;
  34.                 Cardinal _n_u_m__u_n_m_a_n_a_g_e__c_h_i_l_d_r_e_n;
  35.                 WidgetList _m_a_n_a_g_e__c_h_i_l_d_r_e_n;
  36.                 Cardinal _n_u_m__m_a_n_a_g_e__c_h_i_l_d_r_e_n;
  37.                 XtCSMProc _p_o_s_t__u_n_m_a_n_a_g_e__p_r_e__m_a_n_a_g_e__h_o_o_k;
  38.                 XtPointer _c_l_i_e_n_t__d_a_t_a;
  39.  
  40.           Boolean XtIsManaged(_w_i_d_g_e_t)
  41.                 Widget _w_i_d_g_e_t
  42.  
  43.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  44.           _c_h_i_l_d     Specifies the child.
  45.  
  46.           _c_h_i_l_d_r_e_n  Specifies a list of child widgets.
  47.  
  48.           _n_u_m__c_h_i_l_d_r_e_n
  49.                     Specifies the number of children.
  50.  
  51.           _w_i_d_g_e_t    Specifies the widget.
  52.  
  53.           _m_a_n_a_g_e__c_h_i_l_d_r_e_n
  54.                     Specifies the list of widget children to add to
  55.                     the managed set.
  56.  
  57.           _n_u_m__m_a_n_a_g_e__c_h_i_l_d_r_e_n
  58.                     Specifies the number of entries in the
  59.                     manage_children list.
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/3/02)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXttttMMMMaaaannnnaaaaggggeeeeCCCChhhhiiiillllddddrrrreeeennnn((((3333XXXXtttt))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXttttMMMMaaaannnnaaaaggggeeeeCCCChhhhiiiillllddddrrrreeeennnn((((3333XXXXtttt))))
  71.  
  72.  
  73.  
  74.           _u_n_m_a_n_a_g_e__c_h_i_l_d_r_e_n
  75.                     Specifies the list of widget children to remove
  76.                     from the managed set.
  77.  
  78.           _n_u_m__u_n_m_a_n_a_g_e__c_h_i_l_d_r_e_n
  79.                     Specifies the number of entries in the
  80.                     unmanage_children list.
  81.  
  82.           _p_o_s_t__u_n_m_a_n_a_g_e__p_r_e__m_a_n_a_g_e__h_o_o_k
  83.                     Specifies the post unmanage, pre manage hook
  84.                     procedure to invoke.
  85.  
  86.           _c_l_i_e_n_t__d_a_t_a
  87.                     Specifies the client data to be passed to the hook
  88.                     precedure.
  89.  
  90.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  91.           The _X_t_M_a_n_a_g_e_C_h_i_l_d_r_e_n function performs the following:
  92.  
  93.           +o    Issues an error if the children do not all have the
  94.                same parent or if the parent is not a subclass of
  95.                _c_o_m_p_o_s_i_t_e_W_i_d_g_e_t_C_l_a_s_s.
  96.  
  97.           +o    Returns immediately if the common parent is being
  98.                destroyed; otherwise, for each unique child on the
  99.                list, _X_t_M_a_n_a_g_e_C_h_i_l_d_r_e_n ignores the child if it already
  100.                is managed or is being destroyed and marks it if not.
  101.  
  102.           +o    If the parent is realized and after all children have
  103.                been marked, it makes some of the newly managed
  104.                children viewable:
  105.  
  106.                -    Calls the change_managed routine of the widgets'
  107.                     parent.
  108.  
  109.                -    Calls _X_t_R_e_a_l_i_z_e_W_i_d_g_e_t on each previously unmanaged
  110.                     child that is unrealized.
  111.  
  112.                -    Maps each previously unmanaged child that has
  113.                     map_when_managed _T_r_u_e.
  114.  
  115.           Managing children is independent of the ordering of children
  116.           and independent of creating and deleting children.  The
  117.           layout routine of the parent should consider children whose
  118.           managed field is _T_r_u_e and should ignore all other children.
  119.           Note that some composite widgets, especially fixed boxes,
  120.           call _X_t_M_a_n_a_g_e_C_h_i_l_d from their insert_child procedure.
  121.  
  122.           If the parent widget is realized, its change_managed
  123.           procedure is called to notify it that its set of managed
  124.           children has changed.  The parent can reposition and resize
  125.           any of its children.  It moves each child as needed by
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 10/3/02)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXttttMMMMaaaannnnaaaaggggeeeeCCCChhhhiiiillllddddrrrreeeennnn((((3333XXXXtttt))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXttttMMMMaaaannnnaaaaggggeeeeCCCChhhhiiiillllddddrrrreeeennnn((((3333XXXXtttt))))
  137.  
  138.  
  139.  
  140.           calling _X_t_M_o_v_e_W_i_d_g_e_t, which first updates the x and y fields
  141.           and then calls _X_M_o_v_e_W_i_n_d_o_w if the widget is realized.
  142.  
  143.           The _X_t_M_a_n_a_g_e_C_h_i_l_d function constructs a _W_i_d_g_e_t_L_i_s_t of length
  144.           one and calls _X_t_M_a_n_a_g_e_C_h_i_l_d_r_e_n.
  145.  
  146.           The _X_t_U_n_m_a_n_a_g_e_C_h_i_l_d_r_e_n function performs the following:
  147.  
  148.           +o    Issues an error if the children do not all have the
  149.                same parent or if the parent is not a subclass of
  150.                _c_o_m_p_o_s_i_t_e_W_i_d_g_e_t_C_l_a_s_s.
  151.  
  152.           +o    Returns immediately if the common parent is being
  153.                destroyed; otherwise, for each unique child on the
  154.                list, _X_t_U_n_m_a_n_a_g_e_C_h_i_l_d_r_e_n performs the following:
  155.  
  156.                -    Ignores the child if it already is unmanaged or is
  157.                     being destroyed and marks it if not.
  158.  
  159.                -    If the child is realized, it makes it nonvisible
  160.                     by unmapping it.
  161.  
  162.           +o    Calls the change_managed routine of the widgets' parent
  163.                after all children have been marked if the parent is
  164.                realized.
  165.  
  166.           _X_t_U_n_m_a_n_a_g_e_C_h_i_l_d_r_e_n does not destroy the children widgets.
  167.           Removing widgets from a parent's managed set is often a
  168.           temporary banishment, and, some time later, you may manage
  169.           the children again.
  170.  
  171.           The _X_t_U_n_m_a_n_a_g_e_C_h_i_l_d function constructs a widget list of
  172.           length one and calls _X_t_U_n_m_a_n_a_g_e_C_h_i_l_d_r_e_n.
  173.  
  174.           The _X_t_C_h_a_n_g_e_M_a_n_a_g_e_d_S_e_t function performs the following:
  175.  
  176.           +o    Issues an error if the widgets specified in the
  177.                _m_a_n_a_g_e__c_h_i_l_d_r_e_n and the _u_n_m_a_n_a_g_e__c_h_i_l_d_r_e_n lists to no
  178.                all have the same parent, or if that parent is not a
  179.                subclass of compositeWidgetClass.
  180.  
  181.           +o    Returns immediately if the common parent is being
  182.                destroyed.
  183.  
  184.           +o    If no _C_o_m_p_o_s_i_t_e_C_l_a_s_s_E_x_t_e_n_s_i_o_n is defined, or a
  185.                _C_o_m_p_o_s_i_t_e_C_l_a_s_s_E_x_t_e_n_s_i_o_n is defined but with an
  186.                _a_l_l_o_w_s__c_h_a_n_g_e__m_a_n_a_g_e_d__s_e_t field with a value of _F_a_l_s_e,
  187.                and _X_t_C_h_a_n_g_e_M_a_n_a_g_e_d_S_e_t was invoked with a non-NULL
  188.                _p_o_s_t__u_n_m_a_n_a_g_e__p_r_e__m_a_n_a_g_e__h_o_o_k procedure then
  189.                _X_t_C_h_a_n_g_e_M_a_n_a_g_e_d_S_e_t performs the following:
  190.  
  191.                -    Calls _X_t_U_n_m_a_n_a_g_e_C_h_i_l_d_r_e_n (_u_n_m_a_n_a_g_e__c_h_i_l_d_r_e_n,
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 10/3/02)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      XXXXttttMMMMaaaannnnaaaaggggeeeeCCCChhhhiiiillllddddrrrreeeennnn((((3333XXXXtttt))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXttttMMMMaaaannnnaaaaggggeeeeCCCChhhhiiiillllddddrrrreeeennnn((((3333XXXXtttt))))
  203.  
  204.  
  205.  
  206.                     _n_u_m__u_n_m_a_n_a_g_e__c_h_i_l_d_r_e_n).
  207.  
  208.                -    Calls the _p_o_s_t__u_n_m_a_n_a_g_e__p_r_e__m_a_n_a_g_e__h_o_o_k specified.
  209.  
  210.                -    Calls _X_t_M_a_n_a_g_e_C_h_i_l_d_r_e_n (_m_a_n_a_g_e__c_h_i_l_d_r_e_n,
  211.                     _n_u_m__m_a_n_a_g_e__c_h_i_l_d_r_e_n) and then returns immediately.
  212.  
  213.           +o    Otherwise, if a _C_o_m_p_o_s_i_t_e_C_l_a_s_s_E_x_t_e_n_s_i_o_n is defined with
  214.                an _a_l_l_o_w_s__c_h_a_n_g_e__m_a_n_a_g_e_d__s_e_t field with a value of
  215.                _T_r_u_e, or if no _C_o_m_p_o_s_i_t_e_C_l_a_s_s_E_x_t_e_n_s_i_o_n is defined, and
  216.                _X_t_C_h_a_n_g_e_M_a_n_a_g_e_d_S_e_twas _p_o_s_t__u_n_m_a_n_a_g_e__p_r_e__m_a_n_a_g_e__h_o_o_k
  217.                procedure, then the following is performed:
  218.  
  219.                -    For each child on the _u_n_m_a_n_a_g_e__c_h_i_l_d_r_e_n list; if
  220.                     the child is already unmanaged or is being
  221.                     destroyed it is ignored, otherwise it is marked as
  222.                     being unmanaged and if it is realized it is made
  223.                     nonvisible by being unmapped.
  224.  
  225.                -    If the _p_o_s_t__u_n_m_a_n_a_g_e__p_r_e__m_a_n_a_g_e__h_o_o_k procdedure is
  226.                     non-NULL then it is invoked as specified.
  227.  
  228.                -    For each child on the _m_a_n_a_g_e__c_h_i_l_d_r_e_n list; if the
  229.                     child is already managed or it is being destroyed
  230.                     it is ignored, otherwise it is marked as managed
  231.  
  232.           +o    If the parent is realized and after all children have
  233.                been marked, the change_managed method of the parent is
  234.                invoked and subsequently some of the newly managed
  235.                children are made viewable by:
  236.  
  237.                -    Calling _X_t_R_e_a_l_i_z_e_W_i_d_g_e_t on each of the previously
  238.                     unmanaged child that is unrealized.
  239.  
  240.                -    Mapping each previously unmanaged child that has
  241.                     _m_a_p__w_h_e_n__m_a_n_a_g_e_d _T_r_u_e.
  242.  
  243.           The _X_t_I_s_M_a_n_a_g_e_d function returns _T_r_u_e if the specified
  244.           widget is of class RectObj or any subclass thereof and is
  245.           managed, or _F_a_l_s_e otherwise.
  246.  
  247.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  248.           XtMapWidget(3Xt), XtRealizeWidget(3Xt)
  249.           _X _T_o_o_l_k_i_t _I_n_t_r_i_n_s_i_c_s - _C _L_a_n_g_u_a_g_e _I_n_t_e_r_f_a_c_e
  250.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 10/3/02)
  262.  
  263.  
  264.  
  265.